package com.brainhealth.customer.service.impl;

import java.util.List;
import com.brainhealth.common.utils.DateUtils;
import com.brainhealth.customer.domain.UserEventBuriedPointQueryParam;
import com.brainhealth.customer.domain.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.brainhealth.customer.mapper.SysUserOrderBuriedPointResultMapper;
import com.brainhealth.customer.domain.SysUserOrderBuriedPointResult;
import com.brainhealth.customer.service.ISysUserOrderBuriedPointResultService;

/**
 * 用户订单埋点结果Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-05
 */
@Service
public class SysUserOrderBuriedPointResultServiceImpl implements ISysUserOrderBuriedPointResultService 
{
    @Autowired
    private SysUserOrderBuriedPointResultMapper sysUserOrderBuriedPointResultMapper;

    @Override
    public UserOnlineTimeStatusVO getUserOnlineTimeSumStatus(UserEventBuriedPointQueryParam userEventBuriedPointQueryParam) {
        return sysUserOrderBuriedPointResultMapper.getUserOnlineTimeSumStatus(userEventBuriedPointQueryParam);
    }

    @Override
    public List<UserOnlineTimeStatusDetail> getUserOnlineTimeStatus(UserEventBuriedPointQueryParam userEventBuriedPointQueryParam) {
        return sysUserOrderBuriedPointResultMapper.getUserOnlineTimeStatus(userEventBuriedPointQueryParam);
    }

    @Override
    public UserOnlineFrequencyStatusVO getUserFrequencyTimeSumStatus(UserEventBuriedPointQueryParam userEventBuriedPointQueryParam) {
        return sysUserOrderBuriedPointResultMapper.getUserFrequencyTimeSumStatus(userEventBuriedPointQueryParam);
    }

    @Override
    public List<UserOnlineFrequencyStatusDetail> getUserFrequencyTimeStatus(UserEventBuriedPointQueryParam userEventBuriedPointQueryParam) {
        return sysUserOrderBuriedPointResultMapper.getUserFrequencyTimeStatus(userEventBuriedPointQueryParam);
    }

    /**
     * 查询用户订单埋点结果
     * 
     * @param id 用户订单埋点结果主键
     * @return 用户订单埋点结果
     */
    @Override
    public SysUserOrderBuriedPointResult selectSysUserOrderBuriedPointResultById(Long id)
    {
        return sysUserOrderBuriedPointResultMapper.selectSysUserOrderBuriedPointResultById(id);
    }

    /**
     * 查询用户订单埋点结果列表
     * 
     * @param sysUserOrderBuriedPointResult 用户订单埋点结果
     * @return 用户订单埋点结果
     */
    @Override
    public List<SysUserOrderBuriedPointResult> selectSysUserOrderBuriedPointResultList(SysUserOrderBuriedPointResult sysUserOrderBuriedPointResult)
    {
        return sysUserOrderBuriedPointResultMapper.selectSysUserOrderBuriedPointResultList(sysUserOrderBuriedPointResult);
    }

    /**
     * 新增用户订单埋点结果
     * 
     * @param sysUserOrderBuriedPointResult 用户订单埋点结果
     * @return 结果
     */
    @Override
    public int insertSysUserOrderBuriedPointResult(SysUserOrderBuriedPointResult sysUserOrderBuriedPointResult)
    {
        sysUserOrderBuriedPointResult.setCreateTime(DateUtils.getNowDate());
        return sysUserOrderBuriedPointResultMapper.insertSysUserOrderBuriedPointResult(sysUserOrderBuriedPointResult);
    }

    @Override
    public int batchInsertSysUserOrderBuriedPointResult(List<SysUserOrderBuriedPointResult> sysUserOrderBuriedPointResultList) {
        return sysUserOrderBuriedPointResultMapper.batchInsertSysUserOrderBuriedPointResult(sysUserOrderBuriedPointResultList);
    }

    /**
     * 修改用户订单埋点结果
     * 
     * @param sysUserOrderBuriedPointResult 用户订单埋点结果
     * @return 结果
     */
    @Override
    public int updateSysUserOrderBuriedPointResult(SysUserOrderBuriedPointResult sysUserOrderBuriedPointResult)
    {
        return sysUserOrderBuriedPointResultMapper.updateSysUserOrderBuriedPointResult(sysUserOrderBuriedPointResult);
    }

    /**
     * 批量删除用户订单埋点结果
     * 
     * @param ids 需要删除的用户订单埋点结果主键
     * @return 结果
     */
    @Override
    public int deleteSysUserOrderBuriedPointResultByIds(Long[] ids)
    {
        return sysUserOrderBuriedPointResultMapper.deleteSysUserOrderBuriedPointResultByIds(ids);
    }

    /**
     * 删除用户订单埋点结果信息
     * 
     * @param id 用户订单埋点结果主键
     * @return 结果
     */
    @Override
    public int deleteSysUserOrderBuriedPointResultById(Long id)
    {
        return sysUserOrderBuriedPointResultMapper.deleteSysUserOrderBuriedPointResultById(id);
    }
}
